<?php
define('Copyright', '作者QQ:765858558');
define('ROOT_PATH', $_SERVER["DOCUMENT_ROOT"].'/');
include_once ROOT_PATH.'classed/DeBe.php';

$db = new DB();
$qishu="";

 //查询出最新开奖期数
 //广东快乐十分
$sql="SELECT `g_qishu` FROM `g_kaipan` ORDER BY g_id asc limit 1 ";
$result = $db->query($sql, 1);
if ($result){
$qishu=$qishu.$result[0]['g_qishu'].",";
}
 //重庆时时彩
$sql2="SELECT `g_qishu` FROM `g_kaipan2` ORDER BY g_id asc limit 1 ";
$result2 = $db->query($sql2, 1);
if ($result2){
$qishu=$qishu.$result2[0]['g_qishu'].",";
}
//幸运农场
$sql9="SELECT `g_qishu` FROM `g_kaipan9` ORDER BY g_id asc limit 1 ";
$result9 = $db->query($sql9, 1);
if ($result9){
$qishu=$qishu.$result9[0]['g_qishu'].",";
}
//幸运飞艇
$sql4="SELECT `g_qishu` FROM `g_kaipan4` ORDER BY g_id asc limit 1 ";
$result4 = $db->query($sql4, 1);
if ($result4){
$qishu=$qishu.$result4[0]['g_qishu'].",";
}
//北京赛车
$sql6="SELECT `g_qishu` FROM `g_kaipan6` ORDER BY g_id asc limit 1 ";
$result6 = $db->query($sql6, 1);
if ($result6){
$qishu=$qishu.$result6[0]['g_qishu'].",";
}
//江苏快三
$sql7="SELECT `g_qishu` FROM `g_kaipan7` ORDER BY g_id asc limit 1 ";
$result7 = $db->query($sql7, 1);
if ($result7){
$qishu=$qishu.$result7[0]['g_qishu'].",";
}
//北京快乐8
$sql8="SELECT `g_qishu` FROM `g_kaipan8` ORDER BY g_id asc limit 1 ";
$result8 = $db->query($sql8, 1);
if ($result8){
$qishu=$qishu.$result8[0]['g_qishu'].",";
}
//全天五分彩
$sql3="SELECT `g_qishu` FROM `g_kaipan3` ORDER BY g_id asc limit 1 ";
$result3 = $db->query($sql3, 1);
if ($result3){
$qishu=$qishu.$result3[0]['g_qishu'].",";
}
//新疆时时彩
$sql10="SELECT `g_qishu` FROM `g_kaipan10` ORDER BY g_id asc limit 1 ";
$result10 = $db->query($sql10, 1);
if ($result10){
$qishu=$qishu.$result10[0]['g_qishu'].",";
}
//天津时时彩
$sql11="SELECT `g_qishu` FROM `g_kaipan11` ORDER BY g_id asc limit 1 ";
$result11 = $db->query($sql11, 1);
if ($result11){
$qishu=$qishu.$result11[0]['g_qishu'];
}

echo $qishu;